<?

try{


    defined('BASE_PATH') || define('BASE_PATH', realpath(__DIR__).'/..');

    if(!array_key_exists("priv", $_GET)) throw new \Exception("Unknown module!");

    
	include_once '../api/Autoload.php';
	
	Api\Autoloader::__initAutoloader(array(
                BASE_PATH.'/',
                BASE_PATH.'/api/',			
				BASE_PATH.'/site/controller/',
				BASE_PATH.'/site/model/',
				BASE_PATH.'/site/view/',
                BASE_PATH.'/site/',
                ));
				
	Api\AjaxEvent::ParseEventData($_GET['priv']);
		
}catch(Exception $e)
{
  echo  json_encode(array(
    "status"=>false,
    "message"=> $e->__toString()
  ));
 
}

?>